package com.lilicould.dao;

import com.lilicould.entity.Colleges;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CollegeDao {
    // 获取所有学院信息
    @Select("select * from colleges order by college_code")
    List<Colleges> getAllCollege();

    // 添加一个学院信息
    @Insert("insert into colleges values(#{collegeCode}, #{collegeName})")
    int addCollege(Colleges college);

    // 删除一个学院信息
    @Delete("delete from colleges where college_code = #{collegeCode}")
    int deleteCollege(String collegeCode);
}
